<ul>
          <?php
            if(!empty($data)):
                foreach ($data as $data):?>
                
                    <li class="dayago icon_pin_16">
                    
                        <span class="day">
                            <?php echo timespan($data->created);?> ago
                        </span> 
                        
                        <strong class="user_credit">
                            <?php echo ' '.$data->username;?>
                        </strong> 
                        
                        completed 
                        <?php 
                            if($data->type){
                                echo '<a href="'.base_url().'offer/detail/'.$data->idoff.'" target="_blank"> '.$data->name,'</a>';
                            }else{
                                echo '<a href="'.base_url().'offer/wall"> '.$data->name,'</a>';
                            }
                            
                        ?>                       
                        
                        and earned <span id="tien"><?php echo $data->point;?></span><span class="point_iconn"></span>
                    </li>        
        
            <?php endforeach;endif;?>
        </ul>